{extend name="index/index" /}
{block name="sidebar"}
<div id="sidebar-menu">
    <ul>
        <li class='has_sub'><a href='javascript:void(0);'><i class='icon-home-3'></i><span>仪表盘</span>
            <span class="pull-right"><i class="fa fa-angle-down"></i></span></a>
            <ul>
                <li><a href='{:url("admin/Index/login")}' ><span>首页</span></a></li>
            </ul>
        </li>
        <li class='has_sub'><a href='javascript:void(0);'><i
                class='icon-feather'></i><span>用户管理</span> <span class="pull-right"><i
                class="fa fa-angle-down"></i></span></a>
            <ul>
                <li><a href='{:url("admin/User/index")}'><span>用户列表</span></a></li>
                <li><a href='{:url("admin/User/create")}'><span>用户添加</span></a></li>
            </ul>
        </li>
        <li class='has_sub'><a href='javascript:void(0);'><i class='fa fa-map-marker'></i><span>管理员管理</span>
            <span class="pull-right"><i class="fa fa-angle-down"></i></span></a>
            <ul>
                <li><a href='{:url("admin/Admin/index")}' class='active'><span>管理员列表</span></a></li>
                <li><a href='{:url("admin/Admin/create")}'><span>管理员添加</span></a></li>
            </ul>
        </li>
        <li class='has_sub'><a href='javascript:void(0);'><i class='icon-pencil-3'></i><span>角色管理</span>
            <span class="pull-right"><i class="fa fa-angle-down"></i></span></a>
            <ul>
                <li><a href='{:url("admin/role/index")}'><span>角色列表</span></a></li>
            </ul>
        </li>
        <li class='has_sub'><a href='javascript:void(0);'><i class='fa fa-table'></i><span>权限管理</span>
            <span class="pull-right"><i class="fa fa-angle-down"></i></span></a>
            <ul>
                <li><a href='{:url("admin/auth/index")}'><span>权限列表</span></a></li>
                <li><a href='{:url("admin/auth/create")}'><span>权限添加</span></a></li>
            </ul>
        </li>
        <li class='has_sub'><a href='javascript:void(0);'><i class='fa fa-envelope'></i><span>笔记管理</span>
            <span class="pull-right"><i class="fa fa-angle-down"></i></span></a>
            <ul>
                <li><a href='{:url("admin/Note/index")}'><span>笔记列表</span></a></li>
            </ul>
        </li>
        <li class='has_sub'><a href='javascript:void(0);'><i class='icon-chart-line'></i><span>分类管理</span>
            <span class="pull-right"><i class="fa fa-angle-down"></i></span></a>
            <ul>
                <li><a href='{:url("admin/Category/index")}'><span>分类列表</span></a></li>
                <li><a href='{:url("admin/Category/add")}'><span>分类添加</span></a></li>
                <li><a href='{:url("admin/Category/noteList")}'><span>笔记类型列表</span></a></li>
                <li><a href='{:url("admin/Category/noteAdd")}'><span>笔记类型添加</span></a></li>
            </ul>
        </li>
        <li class='has_sub'><a href='javascript:void(0);'><i class='icon-megaphone'></i><span>评论管理</span>
            <span class="pull-right"><i class="fa fa-angle-down"></i></span></a>
            <ul>
                <li><a href='{:url("admin/Comment/index")}'><span>评论列表</span></a></li>
            </ul>
        </li>
        <li class='has_sub'><a href='javascript:void(0);'><i class='icon-megaphone'></i><span>新闻管理</span>
            <span class="pull-right"><i class="fa fa-angle-down"></i></span></a>
            <ul>
                <li><a href='{:url("admin/news/index")}'><span>新闻列表</span></a></li>
                <li><a href='{:url("admin/news/create")}'><span>添加新闻</span></a></li>
            </ul>
        </li>
        <li class='has_sub'><a href='javascript:void(0);'><i class='icon-megaphone'></i><span>推荐管理</span>
            <span class="pull-right"><i class="fa fa-angle-down"></i></span></a>
            <ul>
                <li><a href='{:url("admin/Top/index")}'><span>推荐列表</span></a></li>
            </ul>
        </li>
    </ul>
    <div class="clearfix"></div>
</div>
{/block}

{block name="main"}
<!-- 确认删除 -->
<div class="notifyjs-corner" style="top: 0px; right: 0px;">
    <div class="notifyjs-wrapper">
        <div class="notifyjs-container" style="display: none">
            <div class="notifyjs-metro-base notifyjs-metro-cool">
                <div class="image" data-notify-html="image">
                    <i class="fa fa-warning"></i>
                </div>
                <div class="text-wrapper">
                    <div class="title" data-notify-html="title">你确定要删除吗?!</div>
                    <div class="text" data-notify-html="text">
                        Are you sure you want to do nothing?
                        <div class="clearfix"></div>
                        <br>
                        <a class="btn btn-sm btn-default yes">是(Y)</a>
                        <a class="btn btn-sm btn-danger no">否(N)</a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- 确认删除结束 -->

<!-- 更改管理员信息页 -->
<div class="md-modal md-slide-in-right" id="md-slide-in-right">
    <div class="md-content">
        <h3>更改管理员信息</h3>
        <div>

            <div class="widget">
                <div class="widget-content padding">
                    <form action="{:url('admin/Admin/update')}" method="post" role="form" id="ExpressionValidator">
                        <input type="hidden" name="id" id="adId" value="">
                        <input type="hidden" name="voucher" id="adVoucher" value="">
                        <input type="hidden" name="_method" value="PUT" >
                        <div class="form-group">
                            <label>电话</label>
                            <input type="text" class="form-control adTel" name="tel">
                        </div>
                        <div class="form-group">
                            <label>邮箱</label>
                            <input type="text" class="form-control adEmail" name="email">
                        </div>
                        <div class="form-group">
                            <label>真实姓名</label>
                            <input type="text" class="form-control adName" name="real_name">
                        </div>
                        <div class="form-group">
                            <label>原密码</label>
                            <input type="password" class="form-control adLpwd" name="olwpwd">
                        </div>
                        <div class="form-group">
                            <label>新密码</label>
                            <input type="password" class="form-control adNpwd" name="password">
                        </div>
                        <a class="btn btn-danger md-close">取消</a>
                        <button type="submit" class="btn btn-success md-close">提交</button>
                    </form>
                </div>
            </div>
            <p>

            </p>
        </div>
    </div>
</div>
<!-- 更改结束 -->

<div class="row">
    <div class="col-md-12">
        <div class="widget">
            <div class="widget-header transparent">
                <h2><strong>管理员列表</strong></h2>
                <div class="additional-btn">
                    <div class="col-md-4 col-md-offset-8">
                        <div class="input-group">
                            <input type="text"  class="form-control" placeholder="请输入要搜索的管理员" data-toggle="hideseek" data-list=".default_list_data" data-nodata="找不到该相关" autocomplete="off">
                            <span class="input-group-btn">
                            <button class="btn btn-info" type="button"><span class="glyphicon glyphicon-search"></span></button>
                        </span>
                        </div>
                    </div>
                </div>
            </div>
            <div class="widget-content">
                <div class="data-table-toolbar">
                    <div class="row">
                        <div class="col-md-8 col-md-offset-4">
                            <div class="toolbar-btn-action">
                                <!--<a class="btn btn-success"><i class="fa fa-plus-circle"></i> 添加</a>-->
                                <!--<a class="btn btn-danger"><i class="fa fa-trash-o"></i> Delete</a>-->
                                <a href="{:url('admin/admin/create')}" class="btn btn-primary"><i class="fa"></i> 添加管理员</a>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="table-responsive">
                    <table data-sortable class="table table-hover table-striped">
                        <thead>
                        <tr>
                            <th class="text-center">ID</th>
                            <th class="text-center">电话</th>
                            <th class="text-center">邮箱</th>
                            <th class="text-center">管理员凭证</th>
                            <th class="text-center">角色</th>
                            <th class="text-center">状态</th>
                            <th class="text-center">操作</th>
                        </tr>
                        </thead>

                        <tbody class="default_list_data">

                        {volist name="data" id="value"}
                        <tr>
                            <td>{$value['id']}</td>
                            <td><strong>{$value['tel']}</strong></td>
                            <td>{$value['email']}</td>
                            <td>{$value['voucher']}</td>
                            <td>{$value['role']}</td>
                            {if $value['status'] == 1}
                            <td class="btn adminstatus btn-blue-1" adminID="{$value['id']}" status="1" >启用</td>

                            {elseif $value['status'] == 0}
                            <td class="btn adminstatus btn-red-1" adminID="{$value['id']}" status="0">禁用</td>

                            {/if}
                            <td>
                                <div class="btn-group btn-group-xs">
                                    <a href="{:url('admin/admin/read',['id' => $value['id']])}"  title="分配角色" class="btn btn-info "><i class="glyphicon glyphicon-th-large"></i> 分配角色</a>
                                    <button data-modal="md-slide-in-right" data-toggle="tooltip" adminID="{$value['id']}" title="更新" class="btn btn-default md-trigger adminUp"><i class="glyphicon glyphicon-book"></i> 更新</button>
                                    <button  data-toggle="tooltip" adminID="{$value['id']}" title="删除" class="btn btn-red-1 adminDel delete{$value['id']}" ><i class="glyphicon glyphicon-trash"></i> 删除</button>

                                </div>
                            </td>
                        </tr>
                        {/volist}
                        </tbody>
                    </table>
                    <div class="pull-right" style="margin-right: 10px">{$data->render()}</div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="__ADJS__adminjs/adminjs.js"></script>
{/block}
